# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>

pkgname=deepin-dock
pkgver=5.5.81
pkgrel=2
pkgdesc='Deepin desktop-environment - dock module'
arch=('loong64' 'x86_64')
url="https://github.com/linuxdeepin/dde-dock"
license=('LGPL3')
depends=('qt5-svg' 'deepin-menu' 'deepin-daemon' 'deepin-launcher' 'deepin-qt5integration'
         'deepin-qt-dbus-factory' 'libdbusmenu-qt5' 'deepin-network-core')
makedepends=('cmake' 'gmock' 'gtest' 'ninja' 'qt5-tools')
conflicts=('dde-dock')
replaces=('dde-dock')
groups=('deepin')
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-dock/archive/$pkgver.tar.gz")
sha512sums=('51913da41cf3dc4114ca63c3ab76d0bd181c3ee868c42e3a19be1115ee21aa4fbf9164cec8af227da6bd43357eb88f29dc7be75db083ec7ca2165b6fa38af982')

build() {
  cd dde-dock-$pkgver
  cmake . -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DDOCK_TRAY_USE_NATIVE_POPUP=YES
  ninja
}

check() {
  cd dde-dock-$pkgver
  # ninja test
}

package() {
  cd dde-dock-$pkgver
  DESTDIR="$pkgdir" ninja install
}
